package usb;
import java.util.Scanner;

public class Test10 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入数字：");
        int num = sc.nextInt();
        boolean flag = true;
        int i=0;
        for (i=2;i<num;i++){
            if(num % i== 0){
                flag  = false;
                    break;
            }else {
                flag = true;
            }
        }
        if(num==1){
            flag=false;
        }
        if(flag){
            System.out.println("是质数");
        }else {
            System.out.println("不是质数");
        }
        }
    }
